package com.shd.edanpei.ui.adapter;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.text.TextUtils;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseViewHolder;
import com.shd.edanpei.R;
import com.shd.edanpei.base.BaseQuickImageAdapter;
import com.shd.edanpei.bean.TeamModel;

/**
 * Created by mc on 2018/11/20.
 * yang-wen-wen
 */

public class TeamAdapter1 extends BaseQuickImageAdapter<TeamModel> {

    public TeamAdapter1(Context context) {
        super(context, R.layout.item_team1);
    }

    @Override
    protected void convert(BaseViewHolder helper, TeamModel item) {

        helper.setText(R.id.tv_name, item.getUserName())
                .setText(R.id.tv_time, item.getCreateTime());

        if (!TextUtils.isEmpty(item.getAvatarUrl())) {
            mLoadImgCtrl.getGlide().load(item.getAvatarUrl()).into((ImageView) helper.getView(R.id.iv_head));
        }
    }

}
